package com.hqyj.ctxp.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("order_item")
public class OrderItem {

    @TableId(value = "item_id",type = IdType.AUTO)
    private Integer itemId;

    @TableField(value = "order_no")
    private Long orderNo;

    @TableField(value = "product_id")
    private Integer productId;

    @TableField(value = "product_name")
    private String productName;

    @TableField(value = "product_image")
    private String productImage;

    @TableField(value = "price")
    private Double price;

    @TableField(value = "number")
    private Integer number;

    @TableField(value = "total_price")
    private Double totalPrice;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createTime;

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date updateTime;
}
